import getRequest from 'crm/getCrm.js'
import postRequest from 'crm/postCrm.js'

//发送验证码
export function getSendcode(payload) {
    return postRequest({
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        },
        responseType: 'json',
        // url:'employee/login', 
        url: '/user/SendCode',
        method: "get",
        params: payload
    })
}
//注销
export function postSignout(payload) {
    return postRequest({
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        },
        responseType: 'json',
        // url:'employee/login', 
        url: '/user/loginoff',
        method: "post",
        data: payload,
    })
}
//密码登录
export function postLoginData(payload) {
    return postRequest({
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        },
        responseType: 'json',
        // url:'employee/login', 
        url: 'user/loginbypasswd',
        method: "post",
        data: payload,
    })
}
//验证码登录
export function postLoginData1(payload) {
    return postRequest({
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        },
        responseType: 'json',
        // url:'employee/login', 
        url: '/user/loginbyVerificationCode',
        method: "post",
        data: payload,
    })
}
//注册
export function postSignup(payload) {
    return postRequest({
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        },
        responseType: 'json',
        // url:'employee/login', 
        url: '/user/registration',
        method: "post",
        data: payload,
    })
}


// //获取主页数据
// export function getHomeData(payload) {
//     return getRequest({
//         url: 'power/user/display',
//         method: "get",
//         params: payload
//     })
// }
// export function updatePasseword(payload) {
//     return postRequest({
//         headers: {
//             'Content-Type': 'application/json;charset=UTF-8'
//         },
//         responseType: 'json',
//         url: 'employee/updatePasseword',
//         method: "post",
//         data: payload,
//     })
// }